from typing import List
import bisect


class Solution:
    def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
        # matrix = []

        def search(x, start, end) -> int:
            print(x, start, end)
            if start == end:
                return start
            mid = (start + end) // 2

            if x > matrix[mid][0]:
                return search(x, mid, end)
            elif x < matrix[mid][0]:
                return search(x, start, mid)
            else:
                return mid

        print(search(target, 0, 2))


if __name__ == "__main__":
    re = Solution().searchMatrix([[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]], 10)
    print(re)
